package com.edu.bean.test;

import com.edu.bean.Student;
import com.edu.controller.UserController;
import com.edu.dao.UserDao;
import com.edu.dao.impl.UserDaoImpl;
import com.edu.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest03 {


    @Test
    public void test01(){
        ApplicationContext context = new ClassPathXmlApplicationContext("app.xml");
        UserController userController = context.getBean(UserController.class);
        userController.userLogin();
    }


    @Test
    public void test02(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("app.xml");
        Student student = context.getBean(Student.class);
        System.out.println(student);
        context.close();

    }


}
